package net.neimeng.luculent.commonmodule.service;

import net.neimeng.luculent.commonmodule.entities.User;
import net.neimeng.luculent.coremodel.datamodel.http.MapResult;
import net.neimeng.luculent.coremodel.datamodel.http.Result;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface PersonalService {

    //登录时，获取手机验证码
    @GET("appLogin/getLoginCode.do")
    Observable<Result> getLoginCode(@Query("cellphoneNo") String cellphoneNo);

    //用户登录
    @FormUrlEncoded
    @POST("appLogin/login.do")
    Observable<MapResult<User>> login(@Field("cellphoneNo") String cellphoneNo,
                                      @Field("code") String code,
                                      @Field("cId") String cId);

}
